package com.qf.business.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qf.business.entity.Course;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * description:
 * author: Ken
 * 公众号：Java架构栈
 */
public interface ICourseDao extends BaseMapper<Course> {

    @Update("update course set has_number = has_number - #{number} where id = #{cid}")
    int decrNumber(@Param("cid") Integer cid, @Param("number") Integer number);
}
